<template>
    <div>
        {{$t('table.add')}}
        <div class="msg-box">
            <div class="msg-ipt-box">
                <input class="msg-ipt" type="text" v-model="formMsg" placeholder="请输入你想广播的话" />
            </div>
            <div class="msg-btn-box">
                <button class="msg-btn" @click="handleVuexMsgChange">发送广播</button>
            </div>
        </div>
    </div>
</template>

<script>

    export default {
        data(){
          return{
              formMsg:''
          }
        },
        methods: {
            handleVuexMsgChange(){
                this.$store.dispatch('appstore/setMsg',  this.formMsg)
            }
        }
    }
</script>